package com.itheima.objectstream;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class InDemo {

    public static void main(String[] args) throws IOException, ClassNotFoundException {

        ObjectInputStream objectInputStream = new ObjectInputStream(new FileInputStream("day11\\obj.txt"));

        Student o = (Student) objectInputStream.readObject();
        System.out.println(o.getName()+"----"+o.getAge());

        objectInputStream.close();

    }
}
